import request from '../utils/request'

export function login(data){
    return request({
        url:'/sys/login',
        data,
        method:'post'
    })
}

export function battle(data){ //pvp对战
    return request({
        url:'/battle/doBattle',
        data,
        method:'post'
    })
}
export function getUserList(data){ //获取用户列表
    return request({
        url:'/player/getAll',
        method:'post',
        data
    })
}
export function getUserInfo(){ //获取用户信息
    return request({
        url:'/player/detail',
        method:'post',
        data:{}
    })
}
export function instanceList(data){ //获取副本列表
    return request({
        url:'/instance/list',
        method:'post',
        data
    })
}

export function joinInstance(data){ //获取副本内npc列表
    return request({
        url:'/instance/join',
        data,
        method:'post'
    })
}
export function challenge(data){ //挑战npc（副本）
    return request({
        url:'/instanceNpc/challenge',
        data,
        method:'post'
    })
}

export function getweapun(data){ //获取玩家武器
    return request({
        url:'/playerWeapon/getAll',
        data,
        method:'post'
    })
}
